0 | module Derive.Lens.Options
 1 |
 2 | import Data.String
 3 |
 4 | %default total
 5 |
 6 | public export
 7 | record LensOptions where
 8 |   constructor LO
 9 |   fieldName :       String -> String
10 |   constructorName : String -> String
11 |   dataTypeName    : String -> String
12 |
13 | export
14 | toLowerHead : String -> String
15 | toLowerHead s = case strM s of
16 |   StrNil       => s
17 |   StrCons x xs => singleton (toLower x) ++ xs
18 |
19 | export
20 | defaultOptions : LensOptions
21 | defaultOptions = LO (++ "L") toLowerHead (\x => toLowerHead x ++ "I")
22 |