Skip to content

Additions for working with F# Interactive, especially modified or added printers.

License

Notifications You must be signed in to change notification settings

SchlenkR/PrettyFsi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
SchlenkR
Jan 11, 2022
cf72c79 · Jan 11, 2022

History

13 Commits
Dec 10, 2021
Dec 9, 2021
Dec 11, 2021
Dec 9, 2021
Dec 5, 2021
Jan 11, 2022
Dec 5, 2021
Dec 11, 2021

Repository files navigation

PrettyFsi

PrettyFsi is an F# Interactive table printer.

It's my contribution to the F# Advent Calendar, 11th Door, organized by Sergey Tihon - thank you very much for organizing this event :)

Important * PrettyFsi isn't a full-blown electric toy christmas present. It's more like a piece of chocolate in your advent calendar. * It's born from my daily needs. * I'm interested in other requirements and needs that could help, and there are quite a few TODOs. So feel free to raise an issue in case something doesn't work for you!

NuGet Badge

Usage

See also: demo.fsx

Bootstrap

#r "nuget: PrettyFsi"

open System
open PrettyFsi

PrettyFsi.addPrinters(fsi, TableMode.Implicit)

Print table of objects

type Test1 =
    { name: string
      degree: int
      weight: float
      birthDate: DateTime
      ids: int list }

[
    { name = "Hans Günther"
      degree = 23
      weight = 56.3
      birthDate = DateTime(2000, 12, 15, 23, 45, 00)
      ids = [ 1; 23; 45; 23; 556 ]
    }
    { name = "Jenny Lawrence"
      degree = 2
      weight = 56.3
      birthDate = DateTime(2000, 12, 15, 23, 45, 00)
      ids = [ 14; 63; 5; 8856 ]
    }
]

// result:
//
//       name              | degree  | weight  | birthDate            | ids                   | 
// ---------------------------------------------------------------------------------------------
// 0 :   "Hans Günther"    |     23  |   56.3  | 15.12.2000 23:45:00  | [1; 23; 45; 23; 556]  | 
// 1 :   "Jenny Lawrence"  |      2  |   56.3  | 15.12.2000 23:45:00  | [14; 63; 5; 8856]     | 

Build / FSharp.Compiler.Interactive.Settings.dll reference

See these instructions for building the solution and resolving the FSharp.Compiler.Interactive.Settings.dll reference.

About

Additions for working with F# Interactive, especially modified or added printers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published