This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
module Common.StringUtils where | |
import qualified Data.Text as T | |
import qualified Data.Text.Encoding as En | |
import qualified Data.Text.Lazy as Lt | |
import qualified Data.Text.Lazy.Encoding as Len | |
import qualified Data.ByteString as Bs | |
import qualified Data.ByteString.Lazy as Lbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//User | |
User { | |
id: UserId | |
username: String | |
} | |
//UserDetails | |
UserDetails { | |
otherDetails: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Text | |
data MyCaseClass | |
= MyCaseClass | |
{ _id :: Int | |
, name :: Text | |
} | |
data MyOtherCaseClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final case class MyCaseClass(id: Int, name: String) | |
final case class MyOtherCaseClass(id: Int, name: String) | |
trait Show[-A]{ | |
def show(a: A): String | |
} | |
object Show { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Drink { Beer, Koolaid } | |
enum PersonKind { AdultKind, ChildKind } | |
type Adult = { | |
kind : PersonKind.AdultKind | |
drink : Drink.Beer | |
profession : string |